# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
#
# This PKGBUILD was extracted from AUR.
# Creator: Dave Reisner <d@falconindy.com>
# Changes by: psf

pkgname=cower
pkgver=18
pkgrel=4
pkgdesc='A simple AUR agent with a pretentious name.'
arch=('x86_64' 'aarch64')
url='http://github.com/falconindy/cower'
license=('MIT')
depends=('curl' 'pacman' 'yajl')
makedepends=('perl')
source=("https://pkgbuild.com/~dreisner/sources/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig})
validpgpkeys=('487EACC08557AD082088DABA1EB2638FF56C0C53')  # Dave Reisner
sha512sums=('aba976019e6d8b394152f62afa7db9b040d02562ec36f99b366265d9047f6e5de50396ad8c71642026fe555f8a50eae2f9574bf4e35c175f237747e7e0973e7f'
            'SKIP')

build() {
  cd "$pkgname-$pkgver"

  make

  sed '/^$/q' src/cower.c >LICENSE
}

package() {
  cd "$pkgname-$pkgver"

  make PREFIX=/usr DESTDIR="$pkgdir" install

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

